package com.authsphere.security.account.api.bind;

import com.authsphere.plugin.api.WebExchange;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.core.Authentication;

import java.io.IOException;

/**
 * @program: AuthSphere
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/20 22:02
 **/
public interface AccountBindService {

    /**
     * 第三方账号绑定
     * @param exchange WebExchange
     */
    void bind(WebExchange exchange);

    /**
     * 第三方登录失败
     * @param request HttpServletRequest
     * @param response HttpServletResponse
     * @param context AccountNotBindContext
     */
    void noBind(HttpServletRequest request, HttpServletResponse response, AccountNotBindContext context) throws IOException;
}
